* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	4.1.2022 	11:08:55 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	4.1.2022 	11:08:55 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	4.1.2022 	11:08:55 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	4.1.2022 	11:08:55 	lx 	(1. Application process)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	4.1.2022 	11:08:55 	lx 	(1. Application process)

  database connect time: 0.0002 seconds. 	4.1.2022 	11:08:55 	lx 	(1. Application process)

* connect: connection changed to 'postgre-demo/fi_demo'. 	4.1.2022 	11:08:55 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	4.1.2022 	11:08:55 	lx 	(1. Application process)

* preference 'system/nc_server_start.json', organization '0' was loaded from database 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	4.1.2022 	11:08:55 	lx 	(1. Application process)

error: preference 'system/nc_server_start.json' was not found
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:553: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/dprf.lua:466: in function 'preferenceFromJson'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:44: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:27>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:70: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:19>]
. 	4.1.2022 	11:08:55 	lx 	(1. Application process)

Tcp server 2 starting. 	4.1.2022 	11:08:55 	_lx_SERVER 	(5. Tcp Server 2)

Field has not been translated: [Product]Reserved. 	4.1.2022 	11:08:55 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Product]Fixed. 	4.1.2022 	11:08:55 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Product]Available. 	4.1.2022 	11:08:55 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Work_Phase_Actual]Previous_Track_Time. 	4.1.2022 	11:08:55 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Work_Order_Schedule]Can_Be_Manufactured. 	4.1.2022 	11:08:55 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Work_Order_Schedule]Manufacturing_State. 	4.1.2022 	11:08:55 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01317f1b80, size: 400. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - table/prf/field_type.json. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/,  http://10.211.55.2:5949/,  http://10.37.129.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/, https://10.211.55.2:5949/, https://10.37.129.2:5949/. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949, 10.211.55.2:5949, 10.37.129.2:5949/. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

--- server started in 0.0014 seconds, 2022-01-04 11:08:56, used memory 3054.4 kb --- 	 5. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	4.1.2022 	11:08:56 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-04 11:08:59
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 756
Content-Uncompressed-Length: 1113

LZ4. 	4.1.2022 	11:08:59 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	4.1.2022 	11:08:59 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	4.1.2022 	11:08:59 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	4.1.2022 	11:08:59 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	4.1.2022 	11:08:59 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	11:08:59 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00109
  
SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id
 FROM invoice inv
 WHERE inv.invoice_id <> ''
 ORDER BY inv.invoice_id. 	4.1.2022 	11:08:59 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	4.1.2022 	11:14:52 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	11:14:52 	lx 	(5. Tcp Server 2)

*** tcp close for sock 78, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 1 027 bytes ***. 	4.1.2022 	11:14:52 	lx 	(5. Tcp Server 2)

closing socket '78'. 	4.1.2022 	11:14:52 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	4.1.2022 	11:28:38 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	11:28:38 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	4.1.2022 	11:34:56 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	11:34:56 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	4.1.2022 	11:37:17 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	11:37:17 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	4.1.2022 	11:42:03 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	11:42:04 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	4.1.2022 	11:47:06 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	11:47:06 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	4.1.2022 	11:48:22 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	11:48:22 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	11:55:11 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	11:55:15 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	11:55:15 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6
 - result _lx_atExe1 size: 4015, first value: ''
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	11:58:51 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 5, send count: 4, loop count: 3, bytes sent 326640 / -8401 remaining, total send time 5 µs. 	4.1.2022 	11:58:51 	lx 	(5. Tcp Server 2)

Sql field error, field number is not valid, field: 'pr.json_data', sql:
	SELECT DISTINCT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.json_data, pr.record_id
 FROM product pr
 WHERE pr.product_id <> ''
 ORDER BY pr.product_id
 INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 	4.1.2022 	12:00:03 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

SELECT DISTINCT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.json_data, pr.record_id  FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:00:03 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4d execute sql error -1: Sql field error, field number is not valid, field: 'pr.json_data', sql:
	SELECT DISTINCT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.json_data, pr.record_id
 FROM product pr
 WHERE pr.product_id <> ''
 ORDER BY pr.product_id
 INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7


SELECT DISTINCT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.json_data, pr.record_id
 FROM product pr
 WHERE pr.product_id <> ''
 ORDER BY pr.product_id
 INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7. 	4.1.2022 	12:00:03 	_lx_SERVER 	(5. Tcp Server 2)

Sql field error, field number is not valid, field: 'pr.json_data', sql:
	SELECT DISTINCT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.json_data, pr.record_id
 FROM product pr
 WHERE pr.product_id <> ''
 ORDER BY pr.product_id
 INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 	4.1.2022 	12:01:11 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

SELECT DISTINCT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.json_data, pr.record_id  FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:01:11 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6
 - result _lx_atExe1 size: 4015, first value: ''
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:01:32 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 8, send count: 4, loop count: 3, bytes sent 326640 / -9631 remaining, total send time 32 µs. 	4.1.2022 	12:01:32 	lx 	(5. Tcp Server 2)

Sql field error, field number is not valid, field: 'pr.json_data.project_id', sql:
	SELECT inr.row_number, inr.product_id, pr.project_id, inr.explanation, inr.delivered_quantity, inr.price__unit, inr.price_total, inr.vat_price
 FROM invoice_row inr
 LEFT OUTER JOIN product pr ON pr.product_id = inr.product_id
 LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id
 WHERE inv.record_id = ''
 ORDER BY inr.row_number
 INTO :_lx_alExe1,:_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_arExe4
 	4.1.2022 	12:02:10 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

SELECT inr.row_number, inr.product_id, pr.project_id, inr.explanation, inr.delivered_quantity, inr.price__unit, inr.price_total, inr.vat_price  FROM invoice_row inr  LEFT OUTER JOIN product pr ON pr.product_id = inr.product_id  LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id  WHERE inv.record_id = ''  ORDER BY inr.row_number  INTO :_lx_alExe1,:_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_arExe4
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/moloni/query-local/order_row-sales.json. 	4.1.2022 	12:02:10 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4d execute sql error -1: Sql field error, field number is not valid, field: 'pr.json_data.project_id', sql:
	SELECT inr.row_number, inr.product_id, pr.project_id, inr.explanation, inr.delivered_quantity, inr.price__unit, inr.price_total, inr.vat_price
 FROM invoice_row inr
 LEFT OUTER JOIN product pr ON pr.product_id = inr.product_id
 LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id
 WHERE inv.record_id = ''
 ORDER BY inr.row_number
 INTO :_lx_alExe1,:_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_arExe4


SELECT inr.row_number, inr.product_id, pr.project_id, inr.explanation, inr.delivered_quantity, inr.price__unit, inr.price_total, inr.vat_price
 FROM invoice_row inr
 LEFT OUTER JOIN product pr ON pr.product_id = inr.product_id
 LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id
 WHERE inv.record_id = ''
 ORDER BY inr.row_number
 INTO :_lx_alExe1,:_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_arExe4. 	4.1.2022 	12:02:10 	_lx_SERVER 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 1 046 bytes ***. 	4.1.2022 	12:04:40 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	12:04:40 	lx 	(5. Tcp Server 2)

Sql field error, field number is not valid, field: 'pr.json_data', sql:
	SELECT DISTINCT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.json_data, pr.record_id
 FROM product pr
 WHERE pr.product_id <> ''
 ORDER BY pr.product_id
 INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 	4.1.2022 	12:04:49 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

SELECT DISTINCT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.json_data, pr.record_id  FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:04:49 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4d execute sql error -1: Sql field error, field number is not valid, field: 'pr.json_data', sql:
	SELECT DISTINCT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.json_data, pr.record_id
 FROM product pr
 WHERE pr.product_id <> ''
 ORDER BY pr.product_id
 INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7


SELECT DISTINCT pr.product_group, pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.info, pr.json_data, pr.record_id
 FROM product pr
 WHERE pr.product_id <> ''
 ORDER BY pr.product_id
 INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7. 	4.1.2022 	12:04:49 	_lx_SERVER 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 955 bytes ***. 	4.1.2022 	12:05:15 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	12:05:15 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	4.1.2022 	12:06:19 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	12:06:19 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	4.1.2022 	12:18:14 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	12:18:14 	lx 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:21:38 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 11, send count: 4, loop count: 3, bytes sent 326640 / -15193 remaining, total send time 79 µs. 	4.1.2022 	12:21:38 	lx 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:22:26 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 12, send count: 4, loop count: 3, bytes sent 326640 / -12960 remaining, total send time 59 µs. 	4.1.2022 	12:22:26 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	12:22:54 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	12:22:56 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	12:23:19 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	12:23:19 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	12:23:19 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:23:21 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 18, send count: 4, loop count: 3, bytes sent 326640 / -10923 remaining, total send time 133 µs. 	4.1.2022 	12:23:21 	lx 	(5. Tcp Server 2)

4D: SELECT co.record_id FROM company co WHERE co.company_id <> '' INTO :_lx_atExe1
 - original query: SELECT co.company_id, co.project_id, co.name, co.name_2, co.record_id, co.change_id, co.email, co.info FROM company co  WHERE co.company_id <> ''  ORDER BY co.company_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8
 - result _lx_atExe1 size: 159, first value: '0001'
 - query name: new:form/nc/erp-sync/query/company.json. 	4.1.2022 	12:23:22 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	12:23:53 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	12:23:53 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	12:23:53 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT co.record_id FROM company co WHERE co.company_id <> '' INTO :_lx_atExe1
 - original query: SELECT co.company_id, co.project_id, co.name, co.name_2, co.record_id, co.change_id, co.email, co.info FROM company co  WHERE co.company_id <> ''  ORDER BY co.company_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8
 - result _lx_atExe1 size: 159, first value: '0001'
 - query name: new:form/nc/erp-sync/query/company.json. 	4.1.2022 	12:23:54 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:24:00 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 24, send count: 4, loop count: 3, bytes sent 326640 / -15195 remaining, total send time 80 µs. 	4.1.2022 	12:24:00 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	12:24:03 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:24:05 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 26, send count: 4, loop count: 3, bytes sent 326640 / -12960 remaining, total send time 55 µs. 	4.1.2022 	12:24:05 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	12:26:12 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:26:16 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 28, send count: 4, loop count: 3, bytes sent 326640 / -13225 remaining, total send time 6 µs. 	4.1.2022 	12:26:17 	lx 	(5. Tcp Server 2)

4D: SELECT co.record_id FROM company co WHERE co.company_id <> '' INTO :_lx_atExe1
 - original query: SELECT co.company_id, co.project_id, co.name, co.name_2, co.record_id, co.change_id, co.email, co.info FROM company co  WHERE co.company_id <> ''  ORDER BY co.company_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8
 - result _lx_atExe1 size: 159, first value: '0001'
 - query name: new:form/nc/erp-sync/query/company.json. 	4.1.2022 	12:26:25 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

Sql field error, field number is not valid, field: 'pr.json_data.project_id', sql:
	SELECT inr.row_number, inr.product_id, pr.project_id, inr.explanation, inr.delivered_quantity, inr.price__unit, inr.price_total, inr.vat_price, inr.record_id
 FROM invoice_row inr
 LEFT OUTER JOIN product pr ON pr.product_id = inr.product_id
 LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id
 WHERE inv.record_id = ''
 ORDER BY inr.row_number
 INTO :_lx_alExe1,:_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_arExe4,:_lx_atExe4
 	4.1.2022 	12:26:32 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

SELECT inr.row_number, inr.product_id, pr.project_id, inr.explanation, inr.delivered_quantity, inr.price__unit, inr.price_total, inr.vat_price, inr.record_id  FROM invoice_row inr  LEFT OUTER JOIN product pr ON pr.product_id = inr.product_id  LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id  WHERE inv.record_id = ''  ORDER BY inr.row_number  INTO :_lx_alExe1,:_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_arExe4,:_lx_atExe4
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/moloni/query-local/order_row-sales.json. 	4.1.2022 	12:26:32 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4d execute sql error -1: Sql field error, field number is not valid, field: 'pr.json_data.project_id', sql:
	SELECT inr.row_number, inr.product_id, pr.project_id, inr.explanation, inr.delivered_quantity, inr.price__unit, inr.price_total, inr.vat_price, inr.record_id
 FROM invoice_row inr
 LEFT OUTER JOIN product pr ON pr.product_id = inr.product_id
 LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id
 WHERE inv.record_id = ''
 ORDER BY inr.row_number
 INTO :_lx_alExe1,:_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_arExe4,:_lx_atExe4


SELECT inr.row_number, inr.product_id, pr.project_id, inr.explanation, inr.delivered_quantity, inr.price__unit, inr.price_total, inr.vat_price, inr.record_id
 FROM invoice_row inr
 LEFT OUTER JOIN product pr ON pr.product_id = inr.product_id
 LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id
 WHERE inv.record_id = ''
 ORDER BY inr.row_number
 INTO :_lx_alExe1,:_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_arExe4,:_lx_atExe4. 	4.1.2022 	12:26:32 	_lx_SERVER 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:27:11 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 31, send count: 4, loop count: 3, bytes sent 326640 / -10922 remaining, total send time 37 µs. 	4.1.2022 	12:27:11 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 938 bytes ***. 	4.1.2022 	12:28:54 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	12:28:54 	lx 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	12:33:24 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 32, send result: -1, send count: 2, loop count: 2, bytes sent 163320 / 150359 remaining, total send time 4 µs. 	4.1.2022 	12:33:24 	lx 	(5. Tcp Server 2)

 -- tcp answer 32, send count: 4, loop count: 4, bytes sent 326640 / -12961 remaining, total send time 1252 µs. 	4.1.2022 	12:33:24 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	13:06:59 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	13:06:59 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	13:07:00 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	13:07:15 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	13:07:15 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.invoice_id <> '' INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.customer_project, inv.state, inv.our_reference, inv.company_id, inv.date_, inv.price_total, inv.vat_total, inv.currency_id, inv.terms_of_payment_id, inv.your_reference, inv.invoice_text, inv.record_id FROM invoice inv  WHERE inv.invoice_id <> ''  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_alExe1,:_lx_atExe3,:_lx_atExe4,:_lx_adExe1,:_lx_arExe1,:_lx_arExe2,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9
 - result _lx_atExe1 size: 0
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	4.1.2022 	13:07:16 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 1 026 bytes ***. 	4.1.2022 	13:35:59 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	13:35:59 	lx 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.project_id, pr.name, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe4,:_lx_atExe5
 - result _lx_atExe1 size: 4015, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	4.1.2022 	13:36:32 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 39, send count: 4, loop count: 3, bytes sent 326640 / -15893 remaining, total send time 5 µs. 	4.1.2022 	13:36:33 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	4.1.2022 	13:36:54 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 72, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	4.1.2022 	13:36:54 	lx 	(5. Tcp Server 2)

closing socket '72'. 	4.1.2022 	13:36:54 	lx 	(5. Tcp Server 2)

*** tcp close for sock 73, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	4.1.2022 	13:36:54 	lx 	(5. Tcp Server 2)

closing socket '73'. 	4.1.2022 	13:36:54 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          39
poll.fd_count:        1
pollCount:            385600
pollInCount:          54
pollOutCount:         0
pollCloseCount:       14
pollErrCount:         0
fd add/remove count:  17/16
totalBytesReceived:   38429
totalBytesSent:       948273. 	4.1.2022 	13:36:54 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 77
. 	4.1.2022 	13:36:54 	lx 	(5. Tcp Server 2)

closing socket '77'. 	4.1.2022 	13:36:54 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x01317f1b80. 	4.1.2022 	13:36:54 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01317f1b80, size: 400. 	4.1.2022 	13:36:54 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	4.1.2022 	13:36:54 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x01317f1b80. 	4.1.2022 	13:36:54 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	4.1.2022 	13:36:54 	_lx_SERVER 	(5. Tcp Server 2)

